<layout name="layout"/>
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body, html{
			width: 100%;
			height: 100%;
			margin:0;
			font-family:"微软雅黑";
			font-size:14px;
		}
		#l-map {
			width:100%;
      height: 100%;
			overflow: hidden;
		}

	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=kNO3uGb3WGlaRnqGYvXkvQBbIBkvxTXb"></script>

	<!-- 加载百度地图样式信息窗口 -->
	<title>叠加麻点图层</title>
</head>
<body>
	<div id="l-map">

	</div>
</body>
</html>
<script type="text/javascript" src="/public/admin/js/jquery.min.js"></script>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("l-map");          // 创建地图实例
	var point = new BMap.Point(109.029021,32.700784);  // 创建点坐标
	map.centerAndZoom(point, 6);                 // 初始化地图，设置中心点坐标和地图级别
	map.enableScrollWheelZoom();
	// map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件
  function addMarker(point){
    var marker = new BMap.Marker(point);
    map.addOverlay(marker);
  }
  // 后台获取数据更改经纬度
	$.get('map_a',function(arr){
		var result = JSON.parse(arr);
		// console.log(result);
		for(var i = 0; i < result.length; i++){
			var point = new BMap.Point(result[i].jingdu,result[i].weidu);
			addMarker(point);
		}
	})
</script>
